package com.ruoyi.servie.service;

import com.alipay.api.AlipayApiException;
import com.alipay.api.response.AlipayTradeCreateResponse;
import com.alipay.api.response.AlipayTradeRefundResponse;
import com.ruoyi.servie.param.AliPayParams;
import com.ruoyi.servie.param.AliRefundParams;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface IAliPayService {

    /**
     * 支付宝创建订单
     * @param aliPayParams
     * @return
     */
    AlipayTradeCreateResponse aliPayCreateOrder(AliPayParams aliPayParams);

    /**
     * 支付回调
     * @param request
     * @param response
     * @param requestUrl
     * @throws AlipayApiException
     */
    void aliPayCallback(HttpServletRequest request, HttpServletResponse response, String requestUrl) throws AlipayApiException;

    AlipayTradeRefundResponse aliPayRefund(AliRefundParams aliRefundParams);
}
